quantrocket-codeload's Repositories

29 repositories

backtest-speed-comparison
Trading strategies used to test the speed of Moonshot, Zipline, and Lean. See https://www.quantrocket.com/blog/backtest-speed-comparison/ for the results.
⭐ 3 🌐 Public
backtrader-dma
dual moving average crossover strategy for backtrader
⭐ 4 🌐 Public
benchmark
Equal-weighted and dollar-volume-weighted benchmark strategies for Moonshot
⭐ 1 🌐 Public
borrow-fees-alpha
Introduction to QuantRocket's borrow fees dataset. Uses Alphalens to analyze borrow fees as an alpha source and uses Moonshot to backtest a strategy that shorts stocks with high borrow fees while modeling borrowing costs.
⭐ 1 🌐 Public
brain-sentiment
Overview of 3 sentiment datasets from data provider Brain: Brain Sentiment Indicator (news sentiment), Brain Language Metrics on Company Filings, and Brain Language Metrics on Earnings Call Transcripts.
⭐ 0 🌐 Public
calspread
Intraday trading strategy for futures calendar spreads. Uses crude oil futures and 1-minute bid/ask bars from Interactive Brokers with a Bollinger Band mean reversion strategy. Runs in Moonshot. Demonstrates using exchange native spreads for live/paper trading, and non-native spreads for backtesting.
⭐ 15 🌐 Public
dead-cat-drop
Moonshot strategy that shorts stocks that fell 10% or more the previous day. Demonstrates running a multi-country backtest to find where an anomaly works best. Uses global equities data from EDI.
⭐ 1 🌐 Public
first-last
Intraday momentum strategy that buys (sells) the S&P 500 when the first half hour return and penultimate half hour return are both positive (negative). Uses VIX filter to restrict strategy to high volatility regimes. Uses 30-minute data from Interactive Brokers. Runs in Moonshot.
⭐ 8 🌐 Public
fundamental-factors
Learn how to research fundamental factors using Pipeline, Alphalens, and Sharadar price and fundamental data.
⭐ 16 🌐 Public
futures-import
Tutorial for importing historical futures data from a third-party data provider and combining it with recent data from Interactive Brokers in a Zipline bundle.
⭐ 0 🌐 Public
fx-bizday
Intraday forex strategy that exploits the tendency of currencies to depreciate during local business hours and appreciate during foreign business hours.
⭐ 6 🌐 Public
global-market-profiles
Comparative analysis of stock market characteristics for 17 countries, including number of listings, short sale availability, volatility, distribution of sectors, etc.
⭐ 2 🌐 Public
hello-jupyter
A simple introduction to Jupyter notebooks, to demonstrate how cloning works.
⭐ 1 🌐 Public
hml
HML (High Minus Low) strategy for Moonshot and Zipline, using Reuters Fundamentals
⭐ 1 🌐 Public
kitchensink-ml
Machine learning strategy that trains the model using "everything and the kitchen sink": fundamentals, technical indicators, returns, price levels, volume and volatility spikes, liquidity, market breadth, and more. Runs in Moonshot. Utilizes data from Sharadar and IB.
⭐ 14 🌐 Public
market-cap-vs-dollar-volume
No description
⭐ 1 🌐 Public
moonshot-intro
Introductory tutorial for Moonshot demonstrating data collection, universe selection, and backtesting of an end-of-day momentum strategy.
⭐ 10 🌐 Public
moonshotml-intro
Introductory tutorial for MoonshotML demonstrating walk-forward optimization of a simple machine learning strategy. Uses free sample data.
⭐ 2 🌐 Public
pairs-pipeline
Pairs trading strategy that includes a research pipeline for identifying and selecting pairs. Tests all possible pairs in a universe for cointegration using the Johansen test, then runs in-sample backtests on all cointegrating pairs, then runs an out-of-sample backtest on the 5 best performing pairs.
⭐ 35 🌐 Public
pipeline-tutorial
In-depth walkthrough of Pipeline, an API for filtering and performing computations on large universes of securities. The Pipeline API is part of Zipline but can also be used on a standalone basis.
⭐ 11 🌐 Public
qmom
Long-only momentum strategy modeled on Alpha Architect's QMOM ETF, selecting stocks with the smoothest momentum and rebalancing the portfolio before quarter end to capture a window-dressing seasonality effect.
⭐ 8 🌐 Public
quant-finance-lectures
Learn quantitative finance with this comprehensive lecture series. Adapted from the Quantopian Lecture Series. Uses free sample data.
⭐ 508 🌐 Public
quickstart
QuickStart notebooks for QuantRocket
⭐ 2 🌐 Public
qval
Value strategy for US stocks modeled on Alpha Architect's QVAL ETF, using enterprise multiple and Piotroski F-Score to target cheap, high-quality stocks. Utilizes Sharadar fundamental and price data. Runs in Moonshot.
⭐ 7 🌐 Public
sell-gap
Intraday Zipline strategy for US stocks that sells stocks which gap below their moving average after previously trading above it. Demonstrates live trading.
⭐ 4 🌐 Public
trend-day
Intraday momentum strategy that buys (sells) leveraged ETFs late in the trading session following a significant intraday gain (loss) and holds until the close. From Ernie Chan's book Algorithmic Trading. Runs in Moonshot.
⭐ 27 🌐 Public
vmot
Value/Momentum/Trend strategy modeled on Alpha Architect's VMOT ETF.
⭐ 7 🌐 Public
zipline-futures-pairs
futures pairs trading Zipline strategy
⭐ 2 🌐 Public
zipline-intro
Introductory tutorial for Zipline demonstrating data collection, interactive research, and backtesting of a momentum strategy for equities. Uses free sample data.
⭐ 12 🌐 Public